<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}相机百科{% endblock %}</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
    <style>
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background-color: #f8f9fa;
        }
        .navbar {
            background-color: #343a40;
        }
        .navbar-brand {
            font-size: 1.5rem;
            font-weight: bold;
        }
        .container {
            margin-top: 2rem;
        }
        .card {
            margin-bottom: 1.5rem;
            transition: transform 0.3s;
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }
        .footer {
            margin-top: 3rem;
            padding: 1.5rem 0;
            background-color: #343a40;
            color: white;
            text-align: center;
        }
        .btn-primary {
            background-color: #007bff;
            border-color: #007bff;
        }
        .btn-primary:hover {
            background-color: #0056b3;
            border-color: #0056b3;
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark">
        <div class="container">
            <a class="navbar-brand" href="{% url 'encyclopedia:camera_list' %}">相机百科</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'encyclopedia:camera_list' %}">相机列表</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'encyclopedia:category_list' %}">分类浏览</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'encyclopedia:camera_add' %}">添加相机</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'encyclopedia:accessory_list' %}">配件列表</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'encyclopedia:accessory_category_list' %}">配件分类</a>
                    </li>
                    <li class="nav-item {% if request.resolver_match.url_name == 'about' %}active{% endif %}">
                        <a class="nav-link" href="{% url 'encyclopedia:about' %}">关于我们</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <!-- 主要内容 -->
    <div class="container">
        {% block content %}
        {% endblock %}
    </div>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <p>&copy; 2025 相机百科 - 记录摄影器材的知识宝库</p>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>